<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>console test</title>
	</head>
	<body>
		<p>console test</p>
		<p>请通过F12控制台查看</p>
		<p><a href="http://www.mamicode.com/info-detail-611316.html" target="_blank">http://www.mamicode.com/info-detail-611316.html</a></p>
		<div id="box" style="border: 1px solid red;">
			<div class="name">name <input type="text" name="" id="" value="jim" /></div>
			<div>description:good luck</div>
			<ul>
				<li>apple</li>
				<li>orange</li>
				<li>banana</li>
			</ul>
		</div>
		<script type="text/javascript">
			let hw='hello world';
			let catKitty={
				name:'kitty',
				age:2,
				hairColor:'white',
				say:'meow'
			}
			console.log(hw);
			console.clear();
			console.log(hw);
			console.log(catKitty);
			console.log('console.log');
			console.info('console.info');
			console.error('console.error');
			console.warn('console.warn');
			console.debug('console.debug');
			console.log('in console,you can use these command')
			console.log(["$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd", "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventListeners", "undebug", "monitor", "unmonitor", "table", "$0", "$1", "$2", "$3", "$4", "$_"])
			console.log('%s-%d-%i-%f-%o','aaa',123,456,1.25,{name:'park'});
			console.log('%chello %cworld gggggc','color:red;font-size:40px;','color:green;font-size:40px;');
			console.dirxml(document.querySelector('#box'));
			console.dir(document.querySelector('#box'));
			console.log(document.querySelector('#box'));
			console.group('g1');
			console.log('in g1');
			console.groupEnd('g1');
			console.assert(Math.random()>0.5,'assert is false');
			function count () {
				console.count('method count:');
			}
			var i=0
			console.time('t1');
			console.profile('p1');
			while (i<10){
				count();
				i++;
			}
			console.profileEnd('p1');
			console.timeEnd('t1');
			console.table([['name','age'],['sam',2],['jay',3]]);
			console.log('%c','background-image:url(http://127.0.0.1:8020/icedog.javascript.test/content/img/background/bg1.jpg);padding:100px;line-height:10px;');
			console.log2=function (...rest) {
				console.log('%c'+[].slice.call(rest).join(' '),'color:#66ccff;font-size:16px;text-shadow:0 0 2px rgba(0,0,0,0.5)');
			}
			console.log2(hw);
		</script>
	</body>
</html>
